<template>
    <temolate-content template-name="pojo" :file-name="table.pojoName+'.java'">
<pre class="code">
package {{generateConfig.pojoPackage}};
import com.qingqing.common.auth.domain.UserType;
import java.util.Date;
<created-head></created-head>
public class {{table.pojoName}} {
</pre>
            <pre class="code" v-for="(item, index) in table.columns">
<pre class="code" v-if="item.camel=='createUserType'">
/**{{item.remark}} {{item.length||''}}*/
private UserType {{item.camel}};
</pre>
<pre class="code" v-else-if="item.camel=='lastUpdateUserType'">
/**{{item.remark}} {{item.length||''}}*/
private UserType {{item.camel}};
</pre>
<pre class="code" v-else>
/**{{item.remark}} {{item.length||''}}*/
private {{item.javaType}} {{item.camel}};
</pre>
</pre>
<pre class="code getter" v-for="(item, index) in table.columns">
<pre class="code">
<pre class="code" v-if="item.camel=='createUserType'">
    public UserType get{{item.camel.slice(0, 1).toUpperCase() + item.camel.slice(1) }}(){
    return this.{{item.camel}};
}
</pre>
<pre class="code" v-else-if="item.camel=='lastUpdateUserType'">
    public UserType get{{item.camel.slice(0, 1).toUpperCase() + item.camel.slice(1) }}(){
    return this.{{item.camel}};
}
</pre>
<pre class="code" v-else>
    public {{item.javaType}} get{{item.camel.slice(0, 1).toUpperCase() + item.camel.slice(1) }}(){
    return this.{{item.camel}};
}
</pre>
</pre>
</pre>
<pre class="code setter" v-for="(item, index) in table.columns">
<pre class="code">
<pre class="code" v-if="item.camel=='createUserType'">
    public void set{{item.camel.slice(0, 1).toUpperCase() + item.camel.slice(1) }}(UserType {{item.camel}}){
    this.{{item.camel}} = {{item.camel}};
}
</pre>
<pre class="code" v-else-if="item.camel=='lastUpdateUserType'">
    public void set{{item.camel.slice(0, 1).toUpperCase() + item.camel.slice(1) }}(UserType {{item.camel}}){
    this.{{item.camel}} = {{item.camel}};
}
</pre>
<pre class="code" v-else>
    public void set{{item.camel.slice(0, 1).toUpperCase() + item.camel.slice(1) }}({{item.javaType}} {{item.camel}}){
    this.{{item.camel}} = {{item.camel}};
}
</pre>
</pre>
</pre>

            <pre class="code">
}
</pre>
    </temolate-content>
</template>

<script type="text/ecmascript-6">
    import temolateContent from "./template_content"
    import CreatedHead from "../comm/CreatedHead";

    export default {
        components: {
            CreatedHead,
            temolateContent: temolateContent
        },
        props: {
            generateConfig: Object,
            table: Object
        },
        created(){
            console.log("this.table",this.table);
            this.createdHead = this.$utils.createdHead();
            setInterval(()=>{
                this.createdHead = this.$utils.createdHead();
            }, 10 * 1000);
        },
        data(){
            return{
                nowTime:'',
                createdHead:'',
            }
        },
        methods: {
        }
    }
</script>

<style lang="stylus" scoped rel="stylesheet/stylus">
    .codeContent
        background-color: #fff;
        padding: 20px;
        .code
            font-size: 18px;

    #daoContent, #pojoContent, #mapperContent
        &:hover
            background: #3390ff;
            color: #fff;
</style>
